<div class="box box-info" style="border-top-color: #ffffff;box-shadow: 0 1px 1px rgb(255 255 255);">
    <!-- /.box-header -->
    <!-- form start -->
    {!! $form->open() !!}

    <div class="box-body">

        @if(!$tabObj->isEmpty())
            @include('admin::form.tab', compact('tabObj'))
        @else
            <div class="fields-group">

                @if($form->hasRows())
                    @foreach($form->getRows() as $row)
                        {!! $row->render() !!}
                    @endforeach
                @else
                    @foreach($layout->columns() as $column)
                        <div class="col-md-{{ $column->width() }}">
                            @foreach($column->fields() as $field)
                                {!! $field->render() !!}
                            @endforeach
                        </div>
                    @endforeach
                @endif
            </div>
        @endif

    </div>
    <!-- /.box-body -->
    <div class="box-footer">
        {{ csrf_field() }}
        <div class="col-md-12">
            <label class="col-sm-{{$width['label']}}"></label>
            <div class="col-sm-{{$width['field']}}">
                <button type="submit" class="btn btn-primary">{{ trans('admin.submit') }}</button>
            </div>
        </div>
    </div>

    @foreach($form->getHiddenFields() as $field)
        {!! $field->render() !!}
    @endforeach

    <!-- /.box-footer -->
    {!! $form->close() !!}
</div>

<style>
    .skin-blue-light .wrapper {
        background-color: #fff;
    }
</style>

<script>
    @if(Session::has('success'))
    $("button").addClass("disabled");
    $("button").attr("disabled", "disabled");
    var index = parent.layer.getFrameIndex(window.name);
    //parent.layer.close(index);//关闭当前页
    layer.msg(' {{Session::get('success')}}', {icon: 6, time: 1000}, function () {
        parent.location.reload();
        parent.layer.close(index);//关闭当前页
    });
    @elseif(Session::has('error'))
    $("button").addClass("disabled");
    $("button").attr("disabled", "disabled");
    var index = parent.layer.getFrameIndex(window.name);
    //parent.layer.close(index);//关闭当前页
    swal('{{Session::get('error')}}', '', 'error').then(function () {
        parent.location.reload();
        parent.layer.close(index);//关闭当前页
    });
    @endif
</script>
